Skip to content

Conversation

@cmeesters
Copy link
Member

@cmeesters cmeesters commented Oct 14, 2025

added the mastodon announcement bot to snakedeploy.

Summary by CodeRabbit

  • Chores
    • Added automated Mastodon release announcements triggered by release commits on main.
    • Publishes a standardized, multi-paragraph post including version, extracted release notes, links to changelog and release pages, and an attached image with description.
    • Uses a secure project token to publish posts and runs as part of the main-branch release workflow for consistent, timely announcements.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

📝 Walkthrough

Walkthrough

Adds a new GitHub Actions workflow that runs on pushes to main when CHANGELOG.md changes and the commit message contains chore(main): release; it checks out the repo, extracts release notes, and posts a templated release announcement with an image to Mastodon using snakemake/mastodon-release-post-action.

Changes

Cohort / File(s) Summary
Release announcement workflow
.github/workflows/announce-release.yml
New workflow: triggers on push to main when CHANGELOG.md is modified and commit message contains chore(main): release; grants PR read access; checks out the repo; runs snakemake/mastodon-release-post-action with Mastodon token from secrets; passes attachment image and description; extracts version and release notes and posts a multi-paragraph templated announcement (includes placeholders for version, issue URL, changelog, and release notes).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant GH as GitHub Actions
  participant Repo as Repository
  participant Action as Mastodon Post Action
  participant Masto as Mastodon

  Dev->>Repo: Push to main (CHANGELOG.md changed, commit msg: "chore(main): release...")
  GH-->>GH: workflow on push + path filter matches
  alt Commit message contains release token
    GH->>Repo: actions/checkout
    GH->>Action: invoke snakemake/mastodon-release-post-action (inputs: token, attachment, templates)
    Action-->>Action: extract version & release notes
    Action->>Masto: POST announcement + attachment
    Masto-->>Action: confirmation (post URL)
    Action-->>GH: job completes (success)
  else
    GH-->>GH: workflow skipped (commit message condition not met)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify triggers: paths filter and commit message conditional are correct and unambiguous.
  • Confirm secrets usage and that the Mastodon token is referenced securely.
  • Inspect the templated message for correct variable interpolation and that attachments/descriptions are provided as intended.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: added announcement robot' is directly related to the changeset, which adds a new GitHub Actions workflow for announcing releases on Mastodon.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/announcement_robot

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3736a64 and 8ea5db0.

📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

🔇 Additional comments (1)
.github/workflows/announce-release.yml (1)

33-33: Suggestion text already applied.

Line 33 contains the suggestion from @johanneskoester. ✓

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cmeesters
Copy link
Member Author

@johanneskoester please check the pr logo and logo path, whether it is to your liking.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d98dffd and d640a95.

⛔ Files ignored due to path filters (1)
  • pr_logo/pr_logo.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

@cmeesters
Copy link
Member Author

@johanneskoester removed pr-image logo, sticking with established logo in transparent form.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/announce-release.yml (1)

22-22: Consider pinning the action to a stable version tag.

Line 22 uses snakemake/mastodon-release-post-action@main, which always pulls the latest code from main. For reproducibility and stability, consider pinning to a specific version tag (e.g., @v1) instead.

-        uses: snakemake/mastodon-release-post-action@main # == latest
+        uses: snakemake/mastodon-release-post-action@v1

This ensures the workflow is not affected by unexpected changes in the action's main branch.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d640a95 and 5174fce.

⛔ Files ignored due to path filters (1)
  • img/snakedeploy_transparent.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: testing
🔇 Additional comments (1)
.github/workflows/announce-release.yml (1)

31-31: I need to verify the complete list of variables supported by the action and how the GitHub Actions context variable is handled.

Jinja2 template placeholders are supported by the action.

The snakemake/mastodon-release-post-action does support simple double-curly template placeholders, so the message template using {{ version }}, {{ issue_url }}, and {{ changelog }} will work correctly. GitHub Actions variables like ${{ steps.extract-release-notes.outputs.release_notes }} are evaluated by GitHub before being passed to the action, so that syntax is appropriate for GitHub Actions workflows.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5174fce and 3736a64.

📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

🔇 Additional comments (2)
.github/workflows/announce-release.yml (2)

26-27: Confirm status of image parameter removal.

Lines 26–27 pass image and image-description inputs to snakemake/mastodon-release-post-action, which according to the past review does not support these parameters. The previous review comment was marked "done," but these lines remain.

Please clarify:

  • Were these meant to be removed per the past review?
  • Has snakemake/mastodon-release-post-action been updated to support image uploads?
  • If not, these should be removed to avoid silent failures.

42-42: Line 42 actionlint warning is a false positive (already resolved).

The static analysis tool flags the reference to steps.extract-release-notes.outputs.release_notes as undefined. However, the previous review confirmed this pattern is safe: the mastodon-release-post-action Python script automatically extracts release notes from CHANGELOG.md, and the reference evaluates to an empty string harmlessly. This matches the working workflow in snakemake/snakemake. No change needed.

@cmeesters cmeesters merged commit 3cb9b56 into main Nov 26, 2025
6 checks passed
@cmeesters cmeesters deleted the feat/announcement_robot branch November 26, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants